1. Field of the Invention
This invention relates to a non-volatile semiconductor memory device capable of electrically flash-erasing data stored in a plurality of memory cells, for example, and a data erasing method therefor.
2. Description of the Related Art
A memory cell constituting a flash EEPROM is constructed by a transistor having a floating gate and a control gate of stacked structure. When data is written into the flash EEPROM, a write voltage is applied between the control gate and the drain to generate hot electrons in the channel and inject the hot electrons into the floating gate. Further, when data stored in the flash EEPROM is erased, for example, a high voltage is applied to the source to generate an intense electric field between the floating gate and the source so as to emit electrons trapped in the floating gate into the source according to the tunnel phenomenon.
The problem occurring at the time of erasing is overerasing which makes the threshold voltage of the memory cell negative. The memory cell which is set in the overerased state (which is hereinafter referred to as an overerased cell) is set in the ON state even in the non-selected state. Therefore, in a case where a cell which stores data "0" and set in the OFF state is connected to a bit line to which the overerased cell is connected, data cannot be correctly read out even if the cell is selected. In order to prevent the overerasing, an erasing method called an intelligent erasing method is used. In the intelligent erasing method, the erasing and verifying operations are repeatedly effected and the erasing operation is terminated when the threshold voltage of the cell whose erasing operation is slowest becomes lower than a desired voltage.
However, the distribution range of the threshold voltage after the erasing in the flash EEPROM is more than 2 V and is larger in comparison with a case of the ultraviolet erasable type in which the distribution of the threshold voltage falls within 1 V. Therefore, the minimum value of the readout voltage is limited and the possibility of lowering the readout voltage is restricted. Further, it is expected that a fluctuation in the manufacturing process will become larger with miniaturization of cells and it becomes necessary to think of a method of reducing a fluctuation in the erasing operation.
In order to narrow the distribution range of the threshold voltage after the erasing, a compaction sequence is proposed by Intel Co. As shown in FIG. 12, in the compaction sequence, overerased cells are detected (S21 to S23) after the erasing. If any overerased cell is detected as the result of this, the compaction for narrowing the distribution range of the threshold voltage is effected (S24). As shown in FIG. 13, the compaction is to effect the weak program in which data rewriting is effected with a gate voltage lower than the normal writing voltage (S31) and then check whether overerased cells are present or not (S32, S33). After the compaction, an address is incremented (S25, S26) and the above operation is effected for all of the cells. According to the compaction sequence, the distribution range of the threshold voltage after the erasing can be narrowed.
FIG. 14 shows the dependency of the writing characteristic in the weak program on the gate voltage. As is clearly understood from FIG. 14, the threshold voltages Vth of the cells after the writing are converged in dependence on the gate voltage Vg at the writing time. Therefore, it becomes possible to effect the rewriting to set the threshold voltage of the overerased cell to a positive value by setting the gate voltage to a low level.
Further, the problem of the conventional flash EEPROM is that a voltage of at least 0 V is applied to the word line in the non-selected state. Therefore, if the overerased cell is connected to a bit line, it is difficult to identify the overerased cell. Therefore, in the conventional method, when the overerased cell connected to the bit line is detected, the weak program is effected for all of the cells connected to the bit line, and then, whether or not the overerased cell is present is verified and the operation is repeatedly effected until no overerased cell is detected.
However, in the conventional method, the following problem occurs.
(1) Since the weak program is also effected for cells of normal threshold voltage other than the overerased cell, the threshold voltage of the normal cell is excessively raised and the cell is set into the insufficiently erased state.
(2) The weak program time of one bit line is necessary for one overerased cell. Therefore, if a large number of overerased cells are present, the rate of the weak program time to the entire erasing time becomes so large and cannot be ignored.
As is understood from the above problem, the conventional method can be applied only when the erasing distribution range is not so largely deviated from a target distribution range. That is, it is based on the assumption that the rate of the overerased cells is extremely small and the threshold voltage of the overerased cell is not set to an excessively large negative value. Therefore, if the voltage at the readout time is kept at the present value of 5 V and the distribution range of the threshold voltage can be made relatively wide, the above conventional method can be satisfactorily used. However, if the power supply voltage is lowered and set to 3 V, for example, it becomes necessary to further lower the upper limit of the threshold voltage after the erasing and it becomes necessary to further narrow the distribution range of the threshold voltage after the compaction. On the assumption that the present distribution immediately after the erasing is used, overerased cells of a number larger than before must be rewritten in order to lower the upper limit of the threshold voltage after the erasing. Therefore, in the conventional method, time required for compaction is made longer and a normal cell other than the overerased cell is set back into the insufficiently erased state, and it is considered that the re-erasing becomes necessary. Therefore, the conventional method has a possibility that the compaction sequence becomes complicated.